projects
/
gtk4.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d03caa4
)
GtkCssProvider: Make it able to parse enums.
author
Carlos Garnacho
<carlosg@gnome.org>
Wed, 20 Oct 2010 16:04:39 +0000
(18:04 +0200)
committer
Carlos Garnacho
<carlosg@gnome.org>
Sat, 4 Dec 2010 14:38:23 +0000
(15:38 +0100)
gtk/gtkcssprovider.c
patch
|
blob
|
history
diff --git
a/gtk/gtkcssprovider.c
b/gtk/gtkcssprovider.c
index 001b062f312d0cb3595340392eca2ba433a33232..045bd64bc4d0554cf3ab1490f769e38386445e69 100644
(file)
--- a/
gtk/gtkcssprovider.c
+++ b/
gtk/gtkcssprovider.c
@@
-2314,6
+2314,17
@@
css_provider_parse_value (GtkCssProvider *css_provider,
else
parsed = FALSE;
}
+ else if (G_TYPE_IS_ENUM (type))
+ {
+ GEnumClass *class;
+ GEnumValue *enum_value;
+
+ class = g_type_class_ref (type);
+ enum_value = g_enum_get_value_by_nick (class, value_str);
+
+ g_value_set_enum (value, enum_value->value);
+ g_type_class_unref (class);
+ }
else if (type == GTK_TYPE_9SLICE)
{
Gtk9Slice *slice;